<?php
class Catchwordcontext extends AppModel{
	var $name = 'Catchwordcontext';
	var $hasMany = array(
			'Catchword' => array(
					'className' => 'Catchword',
					'foreignKey' => 'contextId',
					'order' => 'Catchword.catchword ASC',
					'limit' => '20',
					'fields' => array('Catchword.id','Catchword.catchword','Catchword.avatar'),
					'dependent'=> false
					));
	function getAll($limit = 20, $order = 'Catchwordcontext.context ASC'){
		$recursive = 1;
		$fields = array('Catchwordcontext.context','Catchwordcontext.description');
		return $this->find('all',array('fields'=>$fields,
				'limit' => $limit,
				'order' => $order,
				'recursive' => $recursive
		));
	}
}